package com.devin.model.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * <pre>
 *     博主信息
 * </pre>
 *
 * @author : RYAN0UP
 * @date : 2017/11/14
 */

@NoArgsConstructor
@Data
@Entity
@Table(name = "user")
public class User implements Serializable {

    private static final long serialVersionUID = -5144055068797033741L;

    /**
     * 编号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @JsonIgnore
    private String username;

    public User(String name,String password) {
        this.password = password;
        this.username = name;
    }



    /**
     * 密码
     */
    @JsonIgnore
    private String password;









}
